<?php
    if (!defined('ZT')) exit;

    function por_dias($horarios)
    {
        $res = array_fill(1, 5, array( ));

        foreach ($horarios as $horario) {
            $res[$horario['dia']][] = $horario;
        }
        
        return $res;
    }
?>